import { ref } from 'vue'
import { defineStore } from 'pinia'

export const userStore = defineStore('user', () => {
  const user = ref<any>({})

  const setuser = (val: any) => {
    user.value = val
  }

  const resetuser = () => {
    user.value = {}
  }

  return { user, setuser, resetuser }
}, {
  persist: true
})